
package DTO;

/**
 * This class acts as data transfer abstraction for clerk object attributes. It encapsulates address attributes.
 * This object is transferred back and forth amongst various layers.
 * @author tejinder
 * @see DTO
 */
public class Clerk {

    private int id;
    private String passCode;
    private String firstName;
    private String lastName;

    /**
     * default constructor
     */
    public Clerk() {
        id = 0;
        passCode = "";
        firstName = "";
        lastName = "";
    }

    /**
     * parameterized constructor
     * @param id an integer clerk id
     * @param passCode a string  password
     * @param firstName a string first name
     * @param lastName a string last name
     */
    public Clerk(int id, String passCode, String firstName, String lastName) {
        this.id = id;
        this.passCode = passCode;
        this.firstName = firstName;
        this.lastName = lastName;
    }

    /**
     * gets clerk id
     * @return integer
     */
    public int getID() {
        return id;
    }

    /**
     * gets clerk password
     * @return string
     */
    public String getPassCode() {
        return passCode;
    }

    /**
     * sets clerk password 
     * @param passCode
     */
    public void setPassCode(String passCode) {
        this.passCode = passCode;
    }

    /**
     * gets clerk first name
     * @return string 
     */
    public String getFirstName() {
        return firstName;
    }

    /**
     * sets clerk first name
     * @param firstName string
     */
    public void setfirstName(String firstName) {
        this.firstName = firstName;
    }

    /**
     * gets clerk last name 
     * @return string 
     */
    public String getLastName() {
        return lastName;
    }

    /**
     * sets last name of customer
     * @param lastName string
     */
    public void setlastName(String lastName) {
        this.lastName = lastName;
    }

    /**
     * toString() method overrides the default behavior of Object class toString() method.
     * @return  a string representing the state of object
     */
    public String toString() {
        return "Clerk #" + id + " " + firstName + " " + lastName;
    }
}
